package com.example.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@Getter
@AllArgsConstructor
public enum MachineStatusEnum {

    JiaGong("加工中"),
    XianZhi("闲置"),
    GuZhan("故障"),
    WeiXiu("维修"),
    BaoYang("保养"),
    ZanTing("暂停"),
    BaoFei("报废");

    // 获取所有枚举值的静态方法
    public static List<String> getAllStatuses() {
        return Arrays.stream(MachineStatusEnum.values())  // 获取所有枚举常量
                .map(MachineStatusEnum::getValue)    // 获取每个枚举的值
                .collect(Collectors.toList());     // 转换成 List
    }

    private final String value;

}
